package com.huluobo.a2203kotlinshopping.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2203kotlinshopping.R
import com.huluobo.a2203kotlinshopping.utils.ImageUtils
import com.huluobo.base.bean.CategoryGoodsListBean

/**
 *  Created by LC on 2024/6/28.
 */
class CategoryGoodsListAdapter(list: MutableList<CategoryGoodsListBean>) :
    BaseQuickAdapter<CategoryGoodsListBean, BaseViewHolder>(
        R.layout.item_category_goods_list, list
    ) {
    override fun convert(helper: BaseViewHolder, item: CategoryGoodsListBean) {
        ImageUtils.loadImage(context, item.goods_default_icon, helper.getView(R.id.item_category_list_iv))
        helper.setText(R.id.item_category_list_name_tv, item.goods_desc)
        helper.setText(R.id.item_category_list_price_tv, "价格:￥${item.goods_default_price}元")
    }
}